<!-- 单行编辑菜单栏-->
<script type="text/html" id="apiListBar">

    <!-- 生成后台管理代码 -->
    <div class="layui-btn-container">
        <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
        {{#  if(d.file_name){ }}
        <a class="layui-btn  layui-btn-warm layui-btn-xs" lay-event="create">模块生成</a>
        {{# } }}

        {{#  if(d.is_output==1){ }}
        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete">移除模块代码</a>
        {{# } }}
    </div>

    <!--生成api接口代码-->
    <div class="layui-btn-container">
        <a class="layui-btn  layui-btn-warm layui-btn-xs" lay-event="create_api">api接口生成</a>
        {{# if (d.is_output_api==1){ }}
        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete_api">api接口移除</a>
        {{# } }}
    </div>

</script>

<!--批量编辑菜单栏-->
<script type="text/html" id="toolbarDemo">
    <button class="layui-btn layui-btn-sm" lay-event="sync">同步数据库信息</button>
    <!--<button class="layui-btn layui-btn-sm" lay-event="export">批量导出</button>-->
</script>

<!--checked单选框-->
<script type="text/html" id="switchTpl">
    <input type="checkbox" name="status" value="{{d.id}}" data-value="1|0" lay-skin="switch" lay-text="正常|禁用" lay-filter="switchTpl" {{ d.status == 1 ? 'checked' : '' }}>
</script>

<script type="text/html" id="isHideSwitchTpl">
    <input type="checkbox" name="is_show"  value="{{d.id}}" data-value="1|0" lay-skin="switch" lay-text="显示|隐藏" lay-filter="switchTpl" {{ d.is_show == 1 ? 'checked' : '' }}>
</script>

<script type="text/html" id="isModelSwitchTpl">
    <input type="checkbox" name="is_model"  value="{{d.id}}" data-value="1|0" lay-skin="switch" lay-text="是|否" lay-filter="switchTpl" {{ d.is_model == 1 ? 'checked' : '' }}>
</script>

<script type="text/html" id="showTips">
    <label id='test{{ d.table_name }}' onmouseenter="showTips('{{ d.table_name }}','table_name','table_comment')" onmouseleave='closeTips();'> {{ d.table_name }} </label>
</script>

<!--数据编辑列表-->
<script type="text/html" id="editData">
    {include file="new_module/index_edit"}
</script>

<script type="text/html" id="coverMsg">
    <form class="coverMsg layui-form layui-form-pane" id="coverMsgForm">
        <input type="hidden" name="id" value="{{d.id}}">
        <input type="hidden" name="isCover" value="{{d.isCover}}">
        <input type="hidden" name="isApi" value="{{d.isApi}}">
        <div class="msg">
            {{d.msg}}
        </div>
        <div class="codeMsg">
            请选择需要覆盖的代码类型！
        </div>
        <div class="content">
            {{# if (d.isApi!=1){ }}
            <input type="checkbox"  class="coverMsgForm" name="coverList[controller]" title="控制器(Controller)" lay-skin="primary" value="1" checked>
            <input type="checkbox" class="coverMsgForm" name="coverList[model]" title="模型(Model)" lay-skin="primary" value="1" checked>
            <input type="checkbox" class="coverMsgForm" name="coverList[html]" title="模板(Html)" lay-skin="primary" value="1" checked>
            {{# }else{ }}
            <input type="checkbox" class="coverMsgForm" name="coverList[service]" title="Api控制器(Controller)" lay-skin="primary" value="1" checked>
            <input type="checkbox" class="coverMsgForm" name="coverList[service]" title="Api服务(Service)" lay-skin="primary" value="1" checked>
            <input type="checkbox" class="coverMsgForm" name="coverList[html]" title="Api验证器(Validate)" lay-skin="primary" value="1" checked>
            {{# } }}




        </div>
        <div class="button-group">
            <button type="button" class="layui-btn layui-btn-normal  layui-btn-sm" onclick="coverConfirm()">覆盖生成</button>
            <button type="button" class="layui-btn layui-btn-primary  layui-btn-sm" onclick="coverCancel()">暂不生成</button>
        </div>
    </form>
</script>

<script>


</script>
<style>
    /*增加表格高度*/
    .layui-table-cell {
        height: auto;
    }
    .coverMsg{
        display: flex;
        flex-direction: column;
        padding: 20px;
    }
    .coverMsg .msg{
        font-size: 16px;
        padding-bottom: 10px;
    }
    .coverMsg .codeMsg{
        margin: 10px 0px;
        color: #FF5722;
    }

    .button-group{
        display: flex;
        justify-content: flex-end;
        position: absolute;
        bottom: 10px;
        right: 20px;
    }
</style>